/*
 * Copyright (c) 2021. Moses All Right Reserved
 */

package com.moses.design_patterns.chain;

/**
 * @author Moses
 * @email shenhuohui@gmail.com
 * @date 2021/4/17 21:50
 */
// 责任链模式
public class Client {
    public static void main(String[] args) {
        Handler levelOneHandler = new LevelOneHandler();
        Handler levelTwoHandler = new LevelTwoHandler();
        levelOneHandler.setNextHandler(levelTwoHandler);

        Response response = levelOneHandler.handle(new Request2());
        System.out.println(response.toString());
    }
}
